package com.glodon.paas.account.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.glodon.paas.account.dao.domain.CommunicateEntity;

public interface CommunicateEntityMapper {
    int deleteByPrimaryKey(String id);

    int insert(CommunicateEntity record);

    int insertSelective(CommunicateEntity record);

    CommunicateEntity selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(CommunicateEntity record);

    int updateByPrimaryKey(CommunicateEntity record);

	int deleteAllByUserId(String userId);

	int deleteByContactId(
			@Param("userId")String userId, 
			@Param("contactId")String contactId
			);

	List<CommunicateEntity> selectByUserId(
			@Param("userId")String userId, 
			@Param("order")String order,
			@Param("startIndex")int startIndex, 
			@Param("count")int count
			);

	CommunicateEntity selectByContactId(
			@Param("userId")String userId, 
			@Param("contactId")String contactId
			);

	long countByUserId(String userId);
}
